﻿@using ZhouYu.DreamTour.Model;
@using ZhouYu.DreamTour.Web.Models;
@{
    var count = ViewBag.count as List<Questions>;
    var Replynumber = ViewBag.Replynumber as List<Reply>;
    var UserInfo = UserInfoContext.userInfoContext.UserInfo;
}
<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="~/css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/css/common.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="~/layui-v2.5.4/layui/css/layui.css" />
    <script src="~/js/jquery-3.3.1.min.js"></script>
    <script src="~/layui-v2.5.4/layui/layui.js"></script>
    <script src="~/js/Format.js" type="text/javascript"></script>
    <style>

        * {
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="top_hw clearfix">
        <div class="top_h clearfix">
            <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
            <div class="top_hr">
                @if (UserInfo == null)
                {
                    <a href="/Home/User_Register">会员注册</a>
                    <span>|</span> <a href="/Home/User_Login">登录</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a>
                    @*<a>
                    欢迎你，来到新世界旅行网！
                </a>*@
                }
                else
                {
                    <a href="/Home/User_Center">会员中心</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a> <span>|</span> <a href="/Login/LoginOut">退出</a> <span>|</span>
                    <a>
                        欢迎你，<span>@UserInfo.User_Name</span>来到新世界旅行网！
                    </a>
                }
            </div>
        </div>
    </div>
    <div class="head_w">
        <div class="head_t clearfix">
            <div class="logo"><img src="~/images/logo.jpg"></div>
            <div class="rx_line"><img src="~/images/rx.jpg"></div>
        </div>
    </div>
    <div class="mainNav clearfix">
        <ul class="Nav_ul">
            <li><a href="/Home/Index">首页</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Route">旅游路线</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Scenic">旅游景点</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/CateringAccommodation">餐饮住宿</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Traffic_DatailsOne">交通线路</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Group">旅游团购</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Specialty">地方特产</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/AutoGenerationIntro">自动生成简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Team_Join">团队简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Itinerary_Details">行程导航</a></li>
        </ul>
    </div>
    <div class="b_wrap">
        <div class="current"><span>当前所在地：</span><a href="/Home/Index">首页</a> >> <a href="/Home/User_Center">会员中心</a></div>
        <div class="fmember">
            <div class="fmleft">
                <div class="fmleft_top"><img src="~/images/fmbt1.png" border="0"></div>
                <div class="fmlist">
                    <ul>
                        <li class="f1">订单中心</li>
                        <li> >><a href="/Home/User_Order">我的订单</a> </li>
                        <li> >><a href="/Home/User_Colleague">发布结伴同行</a> </li>
                        <li> >><a href="/Home/User_Apply">我申请的结伴同行</a> </li>
                        <li> >><a href="/Home/User_Comment">我的点评</a> </li>
                        <li class="f2"> >><a href="/Home/User_Questions">我的提问</a> </li>
                    </ul>
                    <ul>
                        <li class="f1">我的优惠卡券</li>
                        <li> >><a href="/Home/User_CashAccount">现金账号</a> </li>
                        <li> >><a href="/Home/User_AllowanceVol">抵用券</a> </li>
                        <li class="f2"> >><a href="/Home/User_TouristVol">旅游券</a> </li>
                    </ul>
                    <ul>
                        <li class="f1">账户信息</li>
                        <li> >><a href="/Home/User_Data">个人资料</a> </li>
                        <li> >><a href="/Home/User_AccountSecurity">账户安全</a> </li>
                        <li>
                            >>
                            <a href="/Home/User_Bank">我的银行卡</a>
                        </li>
                        <li> >><a href="/Home/User_Integral">我的积分</a> </li>
                        <li> >><a href="/Home/User_UpdatePwd">修改密码</a> </li>
                        <li class="f2"> >><a href="/Home/User_Address">配送地址</a> </li>
                    </ul>
                </div>
            </div>
            <div class="fmright">
                <div class="fmr1">
                    <div class="fmr1_top">我的提问</div>
                    <div class="fmr1_m">
                        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                            <ul class="layui-tab-title">
                                <li class="layui-this">我的提问</li>
                                <li>我的回答</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <div class="item clearfix">
                                        @foreach (var item in count)
                                        {
                                            <div class="cont">
                                                <div>
                                                    <span style="font-size:12px;">编号:@item.Questions_Id</span>
                                                    @if (item.Questions_Type == 0)
                                                    {
                                                        <p>提问类型:<span>特产</span></p>
                                                    }
                                                    else if (item.Questions_Type == 1)
                                                    {
                                                        <p>提问类型:<span>线路</span></p>
                                                    }
                                                    else if (item.Questions_Type == 2)
                                                    {
                                                        <p>提问类型:<span>酒店</span></p>
                                                    }
                                                    else if (item.Questions_Type == 3)
                                                    {
                                                        <p>提问类型:<span>饭店</span></p>
                                                    }
                                                </div>
                                                <div class="tit clearfix">
                                                    <span class="layui-badge layui-bg-orange">问</span>
                                                    <a target="_blank" href="#" class="tt">@item.Questions_Content</a>
                                                    <span class="time" style="padding-left:420px;">@item.Questionst_CreateTime</span>
                                                    @if (item.Questions_State == 0)
                                                    {
                                                        <p class="a_ask" style="font-size:12px;color:#ff0000;">未解决&gt;</p>
                                                    }
                                                    else
                                                    {
                                                        <p class="a_ask" style="font-size:12px;color:#ff6a00;">已解决&gt;</p>
                                                    }
                                                    @if (item.Questions_State == 1)
                                                    {
                                                        <span style="padding-left:475px;">回复数(@item.Questions_Count)</span>
                                                    }

                                                    <hr />
                                                </div>
                                            </div>
                                        }
                                        @if (count.Count == 0)
                                        {
                                            <div style="text-align:center;">
                                                <img src="~/images/download.png">
                                                <h5>没有提问哦~</h5>
                                            </div>
                                        }
                                    </div>

                                </div>
                                <div class="layui-tab-item">
                                    @foreach (var item in Replynumber)
                                    {
                                        <div class="cont">
                                            <div>
                                                <span style="font-size:12px;">问题编号:@item.Questions_Id</span>
                                            </div>
                                            <div class="tit clearfix">
                                                <span class="layui-badge layui-bg-orange">答</span>
                                                <a target="_blank" href="#" class="tt">@item.Reply_Content</a>
                                                <span class="time" style="padding-left:420px;">@item.Reply_CreateTime</span>
                                                <hr />
                                            </div>
                                        </div>

                                    }
                                    @if (Replynumber.Count == 0)
                                    {
                                        <div style="text-align:center;">
                                            <img src="~/images/download.png">
                                            <h5>没有回答哦~</h5>
                                        </div>
                                    }
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.use('element', function () {
            var $ = layui.jquery
                , element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

            //触发事件
            var active = {
                tabAdd: function () {
                    //新增一个Tab项
                    element.tabAdd('demo', {
                        title: '新选项' + (Math.random() * 1000 | 0) //用于演示
                        , content: '内容' + (Math.random() * 1000 | 0)
                        , id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                    })
                }
                , tabDelete: function (othis) {
                    //删除指定Tab项
                    element.tabDelete('demo', '44'); //删除：“商品管理”


                    othis.addClass('layui-btn-disabled');
                }
                , tabChange: function () {
                    //切换到指定Tab项
                    element.tabChange('demo', '22'); //切换到：用户管理
                }
            };

            $('.site-demo-active').on('click', function () {
                var othis = $(this), type = othis.data('type');
                active[type] ? active[type].call(this, othis) : '';
            });

            //Hash地址的定位
            var layid = location.hash.replace(/^#test=/, '');
            element.tabChange('test', layid);

            element.on('tab(test)', function (elem) {
                location.hash = 'test=' + $(this).attr('lay-id');
            });

        });
    </script>
</body>
</html>

